package cn.sycoder.resp;

/**
 * 定义状态码
 */
public class Code {

    /**
     * 定义协议-前端和后端统一按照协议执行
     */
    // 添加
    public static final Integer SAVE_OK = 20000;
    public static final Integer SAVE_FAIL = 20001;

    // 更新
    public static final Integer UPDATE_OK = 20010;
    public static final Integer UPDATE_FAIL = 20011;

    // 删除
    public static final Integer DELETE_OK = 20020;
    public static final Integer DELETE_FAIL = 20021;

    // 查询单行
    public static final Integer GET_OK = 20030;
    public static final Integer GET_FAIL = 20031;

    // 查询列表
    public static final Integer PAGE_OK = 20040;
    public static final Integer PAGE_FAIL = 20041;


    // 异常状态码
    public static final Integer BUSINESS_ERR = 50001;
    public static final Integer SYSTEM_ERR = 50002;
    public static final Integer DAO_ERR = 50003;
    public static final Integer OTHER_ERR = 50005;
    public static final String INTERCEPTOR = "50006";
}
